(function () {
    if (!String.prototype.startsWith) {
        Object.defineProperty(String.prototype, 'startsWith', {
            value: function(search, pos) {
                pos = !pos || pos < 0 ? 0 : + pos;
                return this.substring(pos, pos + search.length) === search;
            }
        });
    }
}());